'''
@IDE ：PyCharm
@Author ：知了-海龙
@Date ：2021/8/27 15:45
@Email：hallen200806@163.com
@Desc ：
'''

import random
# 生成n位长度的字符串
def get_share_random_str(n:int):
    s_list = []
    for i in range(n):
        s = random.choice("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789")
        s_list.append(s)

    return "".join(s_list)

if __name__ == '__main__':
    share_url = get_share_random_str(16)

    share_pwd = get_share_random_str(4)
    print(share_url)
    print(share_pwd)